<?php

/**
 * @author Martin Pernica
 * @copyright 2008
 */

class Hash
{
    public $username;
    public $password;
    public $salt;
    
    public $secret_key = '0faf8786effe68580caedb7c3aeb73dd';

    public function __construct($username, $password)
    {
        $this->username = $username;
        $this->password = $password;
    }

    final public function hash()
    {
        $password = hash_hmac('ripemd160', $this->password, $this->secret_key);
        $salt = sha1(md5($this->username . mktime()));

        $this->password = $password;
        $this->salt = $salt;

    }


}

?>